package com.corpgovernment.organization.entity.db;

import com.corpgovernment.common.annotation.OperateLogFieldDesc;
import com.corpgovernment.common.entity.db.BaseEntity;
import com.corpgovernment.common.enums.GenderEnum;
import com.corpgovernment.common.handler.Sm4TypeHandler;
import com.corpgovernment.organization.enumm.ValidEnum;
import lombok.*;
import tk.mybatis.mapper.annotation.ColumnType;

import javax.persistence.*;
import java.util.Date;


/**
 * 非员工用户信息表
 *
 * @author wangyujue
 **/
@SuppressWarnings("serial")
@Data
@EqualsAndHashCode(callSuper = true)
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "mb_org_non_employee_info")
public class MbOrgNonEmployeeInfo extends BaseEntity {

    /**
     * 主键
     **/
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @OperateLogFieldDesc(value = "主键")
    private Long id;

    /**
     * 员工uid
     */
    @Column(name = "employee_uid")
    @OperateLogFieldDesc(value = "员工uid")
    private String employeeUid;

    /**
     * 用户名
     **/
    @Column(name = "name")
    @OperateLogFieldDesc(value = "用户名")
	@ColumnType(typeHandler = Sm4TypeHandler.class)
    private String name;

    /**
     * 用户状态 T:使用中  F:已停用
     **/
    @Column(name = "valid")
    @OperateLogFieldDesc(value = "用户状态", type = ValidEnum.class)
    private String valid;

    /**
     * 用户邮箱
     **/
    @Column(name = "email")
    @OperateLogFieldDesc(value = "用户邮箱")
    private String email;


    /**
     * 用户手机
     **/
    @Column(name = "mobile_phone")
    @OperateLogFieldDesc(value = "用户手机")
	@ColumnType(typeHandler = Sm4TypeHandler.class)
    private String mobilePhone;

    /**
     * 用户性别 M:男  F:女
     **/
    @Column(name = "gender")
    @OperateLogFieldDesc(value = "用户性别", type = GenderEnum.class)
    private String gender;

    /**
     * 生日
     **/
    @Column(name = "birthday")
    @OperateLogFieldDesc(value = "生日")
    private Date birthday;

    /**
     * 英文名前部
     **/
    @Column(name = "first_en_name")
    @OperateLogFieldDesc(value = "英文名前部")
	@ColumnType(typeHandler = Sm4TypeHandler.class)
    private String firstEnName;

    /**
     * 英文名中间
     **/
    @Column(name = "mid_en_name")
    @OperateLogFieldDesc(value = "英文名中间")
	@ColumnType(typeHandler = Sm4TypeHandler.class)
    private String midEnName;

    /**
     * 英文名最后
     **/
    @Column(name = "last_en_name")
    @OperateLogFieldDesc(value = "英文名最后")
	@ColumnType(typeHandler = Sm4TypeHandler.class)
    private String lastEnName;

    /**
     * 国籍二字码
     **/
    @Column(name = "nationality")
    @OperateLogFieldDesc(value = "国籍二字码")
    private String nationality;

    /**
     * 创建时间
     **/
    @Column(name = "datachange_createtime")
    private Date datachangeCreatetime;

    /**
     * 最后更改时间
     **/
    @Column(name = "datachange_lasttime")
    private Date datachangeLasttime;

    /**
     * 员工类型
     */
    @Column(name = "employee_type")
    private Integer employeeType = 2;

    /**
     * 名称信息
     */
    @Column(name = "name_info")
    @OperateLogFieldDesc(value = "姓名信息")
    @ColumnType(typeHandler = Sm4TypeHandler.class)
    private String nameInfo;

    /**
     * 删除状态 0：未删除 1：删除'
     */
    @Column(name = "is_deleted")
    private Boolean isDeleted = false;

    /**
     *
     */
    @Transient
    private String identifyTag;
}
